/** @odoo-module **/
import { Dialog } from "@web/core/dialog/dialog";
import {EventBus, Component, onWillStart,onMounted,onWillDestroy, mount, xml, useEnv, App, reactive, useState,useRef } from "@odoo/owl";
import { rpc } from "@web/core/network/rpc";
import { DateTimeField } from "@web/views/fields/datetime/datetime_field";
import { useService ,useOwnedDialogs} from "@web/core/utils/hooks";
 
export class vueshili extends Component {
    static props =  {"*":true}
    static template = "vueshili";
  
       
setup() {
    this.frame001 = useRef("frame001");
    const self =this;
    this.state = useState({ abc: "" }); // 响应式状态
   onMounted(() => {
        this.frame001.el.onload = () => {
         
              this.frame001.el.contentWindow.aa1 = {
                id: 'root',
                pid: undefined,
                type: 'start',
                name: '发起人',
                executionListeners: [],
                formProperties: [],
                next: {
                  id: 'end',
                  pid: 'root',
                  type: 'end',
                  name: '流程结束',
                  executionListeners: [],
                  next: undefined
                }
              };
              this.frame001.el.contentWindow.aa2 = function (x, y) {
                console.log(x)
                self.state.abc=JSON.stringify(x);
              }
        };
   })
    
}
 
  
 

}
 
